#include <iostream>
#include <cstdio>
using namespace std;

int n, m;
int main()
{
    cin >> n;
    m = (n % 10)*100 + (n / 10 % 10)*10 + n / 100;
    cout << m;
}